package aop.view;

import aop.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Author：汤小洋
 * Date：2023-09-20 9:24
 * Description：<描述>
 */
public class UserView {
    public static void main(String[] args) {
        // 1.创建容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("aop/spring.xml");
        // 2.获取bean
        UserController userController = ac.getBean(UserController.class);
        // 3.调用方法
        userController.login("admin","123456");

        System.out.println("-----------------------------------------------------------");

        userController.logout();

        System.out.println("-----------------------------------------------------------");

        userController.register();
    }
}
